Abstract: This article describes the development process of character and encoding and the correct understanding of related concepts. Examples illustrate how to implement encoding in some practical applications. Next, this article describes several
Document directory
Main methods and constants in the file class
Procedure
Byte output stream: outputstream
Byte input stream: inputstream
Character output stream: writer
Character input stream: Reader
File class
In the entire Io package,
Byte Stream and character streamFirst look at a nasty concept:All the data in the program is transmitted or saved in a stream, and the program needs the data to read the data using the input stream, and when the program needs to save some data, it
1: "Byte" is byte, "bit" is bit;2:1 byte = 8 bit;Char is 2 bytes in Java. Java uses unicode,2 bytes (16 bits) to represent one character.ButString str = "compilation";byte[] bytes = Str.getbytes (); I wonder why it takes 3 bytes here?3 byte is 3*8=24
Article transferred from http://blog.csdn.net/zxman660/article/details/7875799Byte Stream and character streamFirst look at a nasty concept:All the data in the program is transmitted or saved in a stream, and the program needs the data to read the
The bytes package provides a series of functions for reading and writing byte slicesThe function of byte slicing is more, it is divided into basic processing function, comparison function, suffix check function, index function, partition
1. Bytes:
The word (Byte) section is the length unit. Bit (bit) is also the unit of length.
Because computer communication and storage is based on 010101 of such binary data, where a 0 and 1 of the place is called bit (bit), that is, a
The difference between byte (byte) and bit:In computer science, bit is the smallest unit of information, which is called a binary bit. It is usually represented by 0 and 1. Byte is called a byte. It consists of eight (8 bit) bytes (1 byte), used to
This is a creation in
Article, where the information may have evolved or changed.
The Go language standard library bytes, which implements various operations on byte arrays. It is analogous to the facilities of strings package. (It is similar to the
The Java stream is processed into a character stream and a byte stream. A character stream processes a cell that is 2-byte Unicode characters, manipulating characters, character arrays, or strings, and a byte-stream processing unit of 1 bytes,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.